package lexicalUnit;

import chalmersbot.Absyn.CreditC;
import chalmersbot.Absyn.CreditE;
import chalmersbot.Absyn.CreditEC;
import chalmersbot.Absyn.CreditNrC;
import chalmersbot.Absyn.CreditNrE;
import chalmersbot.Absyn.CreditNrEC;
import chalmersbot.Absyn.Credit.Visitor;

public class CheckCredit implements Visitor<String, Environ> {

	@Override
	public String visit(CreditNrEC p, Environ arg) {
		return p.creditnr_.accept(new CheckCreditNr(), arg) + " " + p.ects_.accept(new CheckEcts(), arg) + " " + p.creditwrd_.accept(new CheckCreditWrd(), arg);
	}

	@Override
	public String visit(CreditNrE p, Environ arg) {
		return p.creditnr_.accept(new CheckCreditNr(), arg) + " " + p.ects_.accept(new CheckEcts(), arg);
	}

	@Override
	public String visit(CreditNrC p, Environ arg) {
		return p.creditnr_.accept(new CheckCreditNr(), arg) + " " + p.creditwrd_.accept(new CheckCreditWrd(), arg);
	}

	@Override
	public String visit(CreditE p, Environ arg) {
		return p.ects_.accept(new CheckEcts(), arg);
	}

	@Override
	public String visit(CreditEC p, Environ arg) {
		return p.ects_.accept(new CheckEcts(), arg) + " " + p.creditwrd_.accept(new CheckCreditWrd(), arg);
	}

	@Override
	public String visit(CreditC p, Environ arg) {
		return p.creditwrd_.accept(new CheckCreditWrd(), arg);
	}

}
